var i = require("../../../uv-ui-tools/libs/mixin/mpMixin.js"), t = require("../../../uv-ui-tools/libs/mixin/mixin.js"), e = require("./props.js"), n = require("../../../../common/vendor.js");

require("../../../uv-ui-tools/libs/function/index.js"), require("../../../uv-ui-tools/libs/function/test.js"), 
require("../../../uv-ui-tools/libs/function/digit.js"), require("../../../uv-ui-tools/libs/util/route.js"), 
require("../../../uv-ui-tools/libs/function/debounce.js"), require("../../../uv-ui-tools/libs/function/throttle.js");

var r = {
    name: "uv-index-anchor",
    mixins: [ i.mpMixin, t.mixin, e.props ],
    data: function() {
        return {
            parentData: {
                sticky: !0
            }
        };
    },
    created: function() {
        this.init();
    },
    methods: {
        init: function() {
            var i = this.$uv.$parent.call(this, "uv-index-list");
            if (!i) return this.$uv.error("uv-index-anchor必须要搭配uv-index-list组件使用");
            this.parentData.sticky = i.sticky, i.anchors.push(this);
            var t = this.$uv.$parent.call(this, "uv-index-item");
            if (!t) return this.$uv.error("uv-index-anchor必须要搭配uv-index-item组件使用");
            t.id = this.text.charCodeAt(0);
        }
    }
}, u = n._export_sfc(r, [ [ "render", function(i, t, e, r, u, s) {
    return {
        a: n.t(i.text),
        b: i.$uv.addUnit(i.size),
        c: i.color,
        d: n.n({
            "uv-index-anchor-sticky": u.parentData.sticky
        }),
        e: "uv-index-anchor-".concat(i.text),
        f: i.$uv.addUnit(i.height),
        g: i.bgColor
    };
} ], [ "__scopeId", "data-v-5f1b40f1" ] ]);

wx.createComponent(u);